<%@ page contentType="text/html;charset=UTF-8" language="java"%>

<%@taglib prefix="e" uri="org.topteam/easyui"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<e:templateOverride name="head">
    <script>
        function saveAndClose() {
            jeasyui('form').submit({
                success: function (data) {
                	Alert.info("提交成功", "系统消息", function () {
                        Frame.dialog.close();
                    });
                }
            });
        }
    </script>
</e:templateOverride>


<e:templateOverride name="body">
    <e:form id="form" url="saveTodo.action" style="height:100%">
        <e:panel id="tools" style="padding:3px;" border="false">
            <e:button id="save-btn" text="保存并关闭" classStyle="c-primary" plain="true" iconCls="fa fa-save">
                <e:eventListener event="click" listener="saveAndClose"/>
            </e:button>
            <e:button id="close-btn" text="取消" classStyle="c-danger" plain="true" iconCls="fa fa-close">
                <e:eventListener event="click" listener="Frame.dialog.close"/>
            </e:button>
        </e:panel>
        <e:panel id="formPanel" border="false">
            <div class="input-control">
                <label class="right">任务标题: </label>
                <e:validateInput id="title" classStyle="long" required="true" />
            </div>
            <div class="input-control">
                <label class="right">计划完成时间: </label>
                <e:inputDateTime id="doneDate"></e:inputDateTime>
            </div>
        </e:panel>
    </e:form>
</e:templateOverride>


<%@include file="../template/Template.jsp"%>